#include <stdio.h>
#include <stdlib.h>
#include <string.h> // 添加字符串处理函数的头文件

#define MAX_SIZE 12 // 定义一个足够大的数组大小

char* strcat_1 (char a[], char b[]);

char x[MAX_SIZE] = {'H','e','l','l','o','\0'};
char y[] = {'W','o','r','l','d','\0'};

int main()
{
    char* result = strcat_1(x, y);
    printf("%s\n", result);
    system("pause");
    return 0;
}

char* strcat_1 (char a[], char b[])
{
    int i = 0;
    while (b[i] != '\0') 
    {
        a[strlen(a)] = b[i];
        i++;
    }
    a[strlen(a)] = '\0'; // 添加末尾的空字符
    return a;
}
